package model;

import java.util.LinkedList;
import java.util.List;
import noname.ConfigSettings;

/**
 * Vertegenwoordigt een route.
 * 
 */
public class Route {
    
    private List<RouteWaypoint> waypoints;
    
    public Route() {
        String routePath = ConfigSettings.getInstance().getRoutePath() + "historische_route_breda.txt";
        RouteParser parser = new RouteParser();
        parser.parseRoute(routePath);
        waypoints = parser.getList();
    }
    
    public List<GpsCoordinate> getCoords() {
        List<GpsCoordinate> coords = new LinkedList<GpsCoordinate>();
        for (RouteWaypoint w : waypoints) {
            coords.add(w.getGpsCoordinate());
        }
        return coords;
    }
    
    public List<RouteWaypoint> getPointOfInterests() {
        List<RouteWaypoint> coords = new LinkedList<RouteWaypoint>();
        for (RouteWaypoint w : waypoints) {
            if (w.getPointOfInterest() != null) {
                coords.add(w);
            }
        }
        return coords;
    }
}